import * as _ from 'lodash'

export const useWindowResize = (func: () => void, interval = 20) =>
  window.addEventListener('resize', _.debounce(func, interval))
